/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 库存检验单Entity
 * @author HOHD
 * @version 2021-01-25
 */
@Table(name="st_stock_check_bill", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="product_code", attrName="productCode", label="产品编码"),
		@Column(name="product_name", attrName="productName", label="产品名称", queryType=QueryType.LIKE),
		@Column(name="batch_number", attrName="batchNumber", label="批次号"),
		@Column(name="bar_code", attrName="barCode", label="条码号"),
		@Column(name="case_number", attrName="caseNumber", label="件数"),
		@Column(name="pack_type", attrName="packType", label="包装规格"),
		@Column(name="stock_number", attrName="stockNumber", label="库存数量"),
		@Column(name="check_type", attrName="checkType", label="检验结果"),
		@Column(name="check_desc", attrName="checkDesc", label="检验描述"),
		@Column(name="in_stock_date", attrName="inStockDate", label="入库日期"),
		@Column(name="create_by", attrName="createBy", label="创建者", isUpdate=false, isQuery=false),
		@Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isQuery=false),
		@Column(name="update_by", attrName="updateBy", label="更新者", isQuery=false),
		@Column(name="update_date", attrName="updateDate", label="更新时间", isQuery=false),
		@Column(name="remarks", attrName="remarks", label="备注信息", queryType=QueryType.LIKE),
		@Column(name="is_del", attrName="isDel", label="备注信息"),
	}, orderBy="a.update_date DESC"
)
public class StStockCheckBill extends DataEntity<StStockCheckBill> {
	
	private static final long serialVersionUID = 1L;
	private String productCode;		// 产品编码
	private String productName;		// 产品名称
	private String batchNumber;		// 批次号
	private String barCode;		// 条码号
	private Integer caseNumber;		// 件数
	private String packType;		// 包装规格
	private Integer stockNumber;		// 库存数量
	private Integer checkType;		// 检验结果
	private String checkDesc;		// 检验描述
	private Date inStockDate;		// 入库日期
	private Integer isDel;
	
	public StStockCheckBill() {
		this(null);
	}

	public StStockCheckBill(String id){
		super(id);
	}

	public Integer getIsDel() {
		return isDel;
	}

	public void setIsDel(Integer isDel) {
		this.isDel = isDel;
	}

	public void idIn(String[] idArr) {
		sqlMap.getWhere().and("id", QueryType.IN, idArr);
	}
	@Length(min=0, max=20, message="产品编码长度不能超过 20 个字符")
	public String getProductCode() {
		return productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}
	
	@Length(min=0, max=36, message="产品名称长度不能超过 36 个字符")
	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}
	
	@Length(min=0, max=20, message="批次号长度不能超过 20 个字符")
	public String getBatchNumber() {
		return batchNumber;
	}

	public void setBatchNumber(String batchNumber) {
		this.batchNumber = batchNumber;
	}
	
	@Length(min=0, max=36, message="条码号长度不能超过 36 个字符")
	public String getBarCode() {
		return barCode;
	}

	public void setBarCode(String barCode) {
		this.barCode = barCode;
	}
	
	public Integer getCaseNumber() {
		return caseNumber;
	}

	public void setCaseNumber(Integer caseNumber) {
		this.caseNumber = caseNumber;
	}
	
	@Length(min=0, max=3, message="包装规格长度不能超过 3 个字符")
	public String getPackType() {
		return packType;
	}

	public void setPackType(String packType) {
		this.packType = packType;
	}
	
	public Integer getStockNumber() {
		return stockNumber;
	}

	public void setStockNumber(Integer stockNumber) {
		this.stockNumber = stockNumber;
	}
	
	public Integer getCheckType() {
		return checkType;
	}

	public void setCheckType(Integer checkType) {
		this.checkType = checkType;
	}
	
	@Length(min=0, max=500, message="检验描述长度不能超过 500 个字符")
	public String getCheckDesc() {
		return checkDesc;
	}

	public void setCheckDesc(String checkDesc) {
		this.checkDesc = checkDesc;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getInStockDate() {
		return inStockDate;
	}

	public void setInStockDate(Date inStockDate) {
		this.inStockDate = inStockDate;
	}
	
}